package com.xxx.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xxx.demo.entity.News;
import com.xxx.demo.entity.TUsers;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 562702
* @description 针对表【news(新闻表)】的数据库操作Mapper
* @createDate 2023-03-20 14:24:02
* @Entity generator.domain.News
*/
public interface NewsMapper extends BaseMapper<News> {


  /**
     * 查询所有新闻
     * @return
     */
    List<News> selectNews();


    /**
     * 根据id查询新闻
     * @param id
     * @return
     */
    News selectNewsById(Long id);

    IPage<News> selectNewsPage(Page<News> page,@Param("news") News news);
}




